﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SessionExpire : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void LnkBtnLogin_Click(object sender, EventArgs e)
    {
        if (Request.QueryString["redirect"] != null)
        {
            if (Request.QueryString["redirect"].ToString() == "po")
            {
                Response.Write("<script language=javascript>");
                Response.Write("window.open('login.aspx?redirect=po','_parent');");
                Response.Write("</script>");
            }
            else if (Request.QueryString["redirect"].ToString() == "PM")
            {
                Response.Write("<script language=javascript>");
                Response.Write("window.open('login.aspx?redirect=PM','_parent');");
                Response.Write("</script>");
            }
            else if (Request.QueryString["redirect"].ToString() == "PF")
            {
                Response.Write("<script language=javascript>");
                Response.Write("window.open('login.aspx?redirect=PF','_parent');");
                Response.Write("</script>");
            }
            else if (Request.QueryString["redirect"].ToString() == "PA")
            {
                Response.Write("<script language=javascript>");
                Response.Write("window.open('login.aspx?redirect=PA','_parent');");
                Response.Write("</script>");
            }
        }
        else
        {
            Response.Write("<script language=javascript>");
            Response.Write("window.open('login.aspx','_parent');");
            Response.Write("</script>");
        }
        
    }
}
